<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Insert title here</title>
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<style type="text/css">
.footer {
	position: fixed;
	bottom: 0;
	width: 100%;
}

.moveBar {
	position: absolute;
	width: 250px;
	height: 300px;
	background: #666;
	border: solid 1px #000;
}

#banner {
	background: #52CCCC;
	cursor: move;
}
</style>
</head>
<body style="padding-top: 50px;">

	<div class="moveBar">
		<div id="banner">按住此处移动当前div</div>
		<div class="content">这里是其它内容</div>
	</div>
	<div class="footer">
		<p align="center" class="label">ALL Rights Reserved Qing 版权所有
	</div>
	<script>
		jQuery(document).ready(function() {
			$('#banner').mousedown(function(event) {
				var isMove = true;
				var abs_x = event.pageX - $('div.moveBar').offset().left;
				var abs_y = event.pageY - $('div.moveBar').offset().top;
				$(this).mousemove(function(event) {
					if (isMove) {
						var obj = $('div.moveBar');
						obj.css({
							'left' : event.pageX - abs_x,
							'top' : event.pageY - abs_y
						});
					}
				}).mouseup(function() {
					isMove = false;
				});
			});
		});
	</script>
</body>
</html>
